import { Button, Space } from 'antd';
import React, { useRef } from 'react';
export default () => {
    const max = () => {
        if (!window.nodeUtils) return
        const { ipcRenderer } = window.nodeUtils
        ipcRenderer.send('max')
    }
    const min = () => {
        if (!window.nodeUtils) return
        const { ipcRenderer } = window.nodeUtils
        ipcRenderer.send('mini')
    }
    const notice = () => {
        if (!window.nodeUtils) return
        const { ipcRenderer } = window.nodeUtils
        ipcRenderer.send('notice')
        ipcRenderer.on('notSupported', (e: any) => {
            console.log(e)
        })
    }
    return (
        <Space>
            <Button onClick={max}>最大化</Button>
            <Button onClick={min}>最小化</Button>
            <Button onClick={notice}>显示消息</Button>
        </Space>
    )
}